﻿<Window x:Class="MetroHome.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Name="this"
        WindowStyle="None" AllowsTransparency="True" Background="Transparent"
        SourceInitialized="WindowSourceInitialized" Closing="this_Closing">
    <Window.Resources>
        <Storyboard x:Key="ArrowAnimLeft">
            <DoubleAnimation Storyboard.TargetName="ArrowRotation" Storyboard.TargetProperty="Angle" To="-180" Duration="0:0:0.3" BeginTime="0:0:0.2"/>
            <DoubleAnimation Storyboard.TargetName="WidgetsLibrary" Storyboard.TargetProperty="Width" To="150" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.3"/>
            <DoubleAnimation Storyboard.TargetName="this" Storyboard.TargetProperty="Left" To="-300" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.3"/>
        </Storyboard>
        <Storyboard x:Key="ArrowAnimRight">
            <DoubleAnimation Storyboard.TargetName="ArrowRotation" Storyboard.TargetProperty="Angle" To="0" Duration="0:0:0.3" BeginTime="0:0:0.2"/>
            <DoubleAnimation Storyboard.TargetName="WidgetsLibrary" Storyboard.TargetProperty="Width" To="0" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.3"/>
            <DoubleAnimation Storyboard.TargetName="this" Storyboard.TargetProperty="Left" To="0" Duration="0:0:0.5" AccelerationRatio="0.5" DecelerationRatio="0.3"/>
        </Storyboard>
    </Window.Resources>
    <Window.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Close Metro Home" Click="MenuItemClick"/>
        </ContextMenu>
    </Window.ContextMenu>
    <Grid>
        <!--<Rectangle Name="Bg" Fill="Black" Opacity="1">
            <Rectangle.OpacityMask>
                <LinearGradientBrush StartPoint="0,0" EndPoint="1,0">
                    <GradientStop Color="#FF000000" Offset="0"/>
                    <GradientStop Color="#77000000" Offset="1"/>
                </LinearGradientBrush>
            </Rectangle.OpacityMask>
        </Rectangle>-->
        <Grid Name="RootGrid">
            <Grid.RenderTransform>
                <TranslateTransform />
            </Grid.RenderTransform>
        </Grid>
        <Grid Name="HubGrid">
            <Grid.RenderTransform>
                <TranslateTransform />
            </Grid.RenderTransform>
        </Grid>
        <DockPanel HorizontalAlignment="Right">
            <Image Source="Resources/next.png" Width="42" Height="42" VerticalAlignment="Top" Margin="0,10,3,0" MouseLeftButtonDown="Image_MouseLeftButtonDown">
                <Image.RenderTransform>
                    <TransformGroup>
                        <RotateTransform x:Name="ArrowRotation" CenterX="21" CenterY="21"/>
                    </TransformGroup>
                </Image.RenderTransform>
            </Image>
            <StackPanel Name="WidgetsLibrary" Width="0" HorizontalAlignment="Left"/>
        </DockPanel>
        <Canvas Name="DragCanvas" Visibility="Visible"/>
    </Grid>
</Window>
